package com.lijian.client.feign;

import com.lijian.pojo.User;
import com.lijian.pojo.UserResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "user-service")
public interface UserFeign {
    @GetMapping("/user/findAll")
    public UserResult findAll(@RequestParam Integer page, @RequestParam Integer limit);

    @GetMapping("/user/findById/{id}")
    public User findById(@PathVariable Integer id);

    @PostMapping("/user/save")
    public void save(@RequestBody User user);

    @PutMapping("/user/update")
    public void update(@RequestBody User user);

    @DeleteMapping("/user/deleteById/{id}")
    public void delete(@PathVariable Integer id);
}
